import { h } from "vue";
import { NTime, NCheckbox } from "naive-ui";

export const columns = [
  // {
  //   title: '序号',
  //   key: 'id',
  //   width: 100
  // },
  {
    title: '医院logo',
    width: 100,
    render(row) {
      return h('img', {
        src: 'data:image/jpg;base64,' + row.logoData
      });
    },
  },
  {
    title: '医院名称',
    key: 'hosname',
    width: 100,
  },
  {
    title: '等级',
    width: 100,
    render(row) {
      return row.param.hostypeString;
    }
  },
  {
    title: '详细地址',
    width: 100,
    render(row) {
      return row.param.fullAddress;
    }
  },
  {
    title: '状态',
    key: 'status',
    width: 90,
    render(row) {
      return row.status == 1 ? '已上线': '已下线';
    },
  },
  {
    title: '创建时间',
    key: 'createTime',
    width: 100,
    render(row) {
      return h(NTime, {
        time: row.created,
        format: "yyyy-MM-dd hh:mm:ss"
      });
    },
  }
];
